package com.jxw.launcher;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.jxw.launcher.model.TikuSelectChapterBean;
import com.jxw.launcher.util.ApkJumpUtil;
import com.jxw.launcher.view.UIImageView;

/* loaded from: classes.dex */
public class MyFragmentAi extends BaseFragment {
    private ImageView ctb;
    private ImageView jdc;
    private UIImageView llTiku;
    private ImageView scj;
    private TikuSelectChapterBean tikuSelectChapterBean;
    private ImageView znzj;

    @Override // android.support.v4.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.fg_content_ai, viewGroup, false);
        initShowView(inflate);
        return inflate;
    }

    private void initShowView(View view) {
        this.llTiku = (UIImageView) view.findViewById(R.id.bj);
        this.znzj = (ImageView) view.findViewById(R.id.znzj);
        this.jdc = (ImageView) view.findViewById(R.id.jdc);
        this.ctb = (ImageView) view.findViewById(R.id.ctb);
        this.scj = (ImageView) view.findViewById(R.id.scj);
        this.llTiku.setOnClickListener(new View.OnClickListener() { // from class: com.jxw.launcher.MyFragmentAi.1
            @Override // android.view.View.OnClickListener
            public void onClick(View view2) {
                if (MyFragmentAi.this.tikuSelectChapterBean != null && !TextUtils.isEmpty(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId())) {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 1, -1, Integer.parseInt(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId()));
                } else {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 1, -1, -1);
                }
            }
        });
        this.znzj.setOnClickListener(new View.OnClickListener() { // from class: com.jxw.launcher.MyFragmentAi.2
            @Override // android.view.View.OnClickListener
            public void onClick(View view2) {
                if (MyFragmentAi.this.tikuSelectChapterBean != null && !TextUtils.isEmpty(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId())) {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 3, -1, Integer.parseInt(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId()));
                } else {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 3, -1, -1);
                }
            }
        });
        this.jdc.setOnClickListener(new View.OnClickListener() { // from class: com.jxw.launcher.MyFragmentAi.3
            @Override // android.view.View.OnClickListener
            public void onClick(View view2) {
                if (MyFragmentAi.this.tikuSelectChapterBean != null && !TextUtils.isEmpty(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId())) {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 2, -1, Integer.parseInt(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId()));
                } else {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 2, -1, -1);
                }
            }
        });
        this.ctb.setOnClickListener(new View.OnClickListener() { // from class: com.jxw.launcher.MyFragmentAi.4
            @Override // android.view.View.OnClickListener
            public void onClick(View view2) {
                if (MyFragmentAi.this.tikuSelectChapterBean != null && !TextUtils.isEmpty(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId())) {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 4, -1, Integer.parseInt(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId()));
                } else {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 4, -1, -1);
                }
            }
        });
        this.scj.setOnClickListener(new View.OnClickListener() { // from class: com.jxw.launcher.MyFragmentAi.5
            @Override // android.view.View.OnClickListener
            public void onClick(View view2) {
                if (MyFragmentAi.this.tikuSelectChapterBean != null && !TextUtils.isEmpty(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId())) {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 5, -1, Integer.parseInt(MyFragmentAi.this.tikuSelectChapterBean.getSubjectId()));
                } else {
                    ApkJumpUtil.aiTiku(MyApp.getInstance(), Common.readToken(MyFragmentAi.this.getContext()), 5, -1, -1);
                }
            }
        });
    }

    @Override // android.support.v4.app.Fragment
    public void onResume() {
        super.onResume();
    }
}
